﻿Imports System
Imports System.Diagnostics

Namespace System.Workflow.Activities
    Friend Class WorkflowActivityTrace
        ' Methods
        Shared Sub New()
            WorkflowActivityTrace.activity.Switch = New SourceSwitch("System.Workflow.Activities", SourceLevels.Off.ToString)
            WorkflowActivityTrace.rules = New TraceSource("System.Workflow.Activities.Rules")
            WorkflowActivityTrace.rules.Switch = New SourceSwitch("System.Workflow.Activities.Rules", SourceLevels.Off.ToString)
            Dim listener As TraceListener
            For Each listener In Trace.Listeners
                If Not TypeOf listener Is DefaultTraceListener Then
                    WorkflowActivityTrace.activity.Listeners.Add(listener)
                    WorkflowActivityTrace.rules.Listeners.Add(listener)
                End If
            Next
        End Sub


        ' Properties
        Friend Shared ReadOnly Property Activity As TraceSource
            Get
                Return WorkflowActivityTrace.activity
            End Get
        End Property

        Friend Shared ReadOnly Property Rules As TraceSource
            Get
                Return WorkflowActivityTrace.rules
            End Get
        End Property


        ' Fields
        Private Shared activity As TraceSource = New TraceSource("System.Workflow.Activities")
        Private Shared rules As TraceSource
    End Class
End Namespace

